{extend name="layout/layout"}
{block name="content"}
<main class="user_page  ">
    <section class="">
        <div class="layui-main">
            <div class="user_con">
                <div class="user_headpage" >
                    {include file="user_activity/page_menu" menu='par_notice' id="$id" /}
                </div>
                <div class="right_main ">
                    <p class="ft24 mb10 ft-bold">活動通知</p>
                    <p class="ft14 gary_c9 mb20 ft-bold">活動通知發送給報名人，並非發送給所有參加人（報名人可能幫其他參加人報名）</p>
                    <div class="block_com" style="min-height: 70vh;">
                       <a href="user_active_par_notice_add.html" class="d-flex jc-fe mb15">
                          <button class="layui-btn layui-bg-orange">新增通知</button>
                       </a>
                       <table class="layui-table a9_table uapn_tab " lay-skin="line">
                          <colgroup>
                             <col width="100">
                             <col>
                             <col width="120">
                             <col width="120">
                             <col width="180">
                             <col width="180">
                          </colgroup>
                          <thead>
                             <tr>
                                <th>類型</th>
                                <th> 信件主题</th>
                                <th> 發送狀態 </th>
                                <th> 發送人數</th>
                                <th> 預計發送時間</th>
                                <th> 操作</th>
                             </tr>
                          </thead>
                          <tbody class="ft-bold ">
                             {if count($list)} 
                                {volist name="list" id="vo"} 
                                 <tr>
                                    <td class="">
                                       <p class="orange_c">Email</p>
                                    </td>
                                    <td>{$vo.title}</td>
                                    <td>{$vo.status_name}</td>
                                    <td>{$vo.send_count}</td>
                                    <td>{$vo.front_time}</td>
                                    <td class="orange_c">
                                       <!-- <a class="mr10">复制</a> -->
                                       <a data-btn="delete" data-id="{$vo.id}" class="delete">删除</a>
                                    </td>
      
                                 </tr>
                                {/volist}
                             {/if}
             
                          </tbody>
                       </table>
                    </div>
                 </div>
            </div>
        </div>
    </section>
</main>
<script>

$(document).on('click', '.delete', function () {
      var id = $(this).data('id')
      layer.confirm('確定删除嗎?',{title:false}, function(index){
         $.quickPost('/activity/user/activity/{$act.id}/user_active_par_notice',{notice_id:id}).done((res) => {
            location.reload();
        })
      layer.close(index);
      });
   })

</script>

{/block}